<MDXHeader
  title="Collapsible"
  description="An interactive component which expands/collapses a content."
  docs="https://kobalte.dev/docs/core/components/CollapsibleContent"
/>

<ComponentPreview name="collapsible-demo" />

## Installation

<Tabs defaultValue="cli">

<TabsList>
  <TabsTrigger value="cli">CLI</TabsTrigger>
  <TabsTrigger value="manual">Manual</TabsTrigger>
</TabsList>

<TabsContent value="cli">

```bash
npx solidui-cli@latest add collapsible
```

</TabsContent>

<TabsContent value="manual">
<Steps>

<Step>Install the following dependencies: </Step>

```bash
npm install @kobalte/core
```

<Step>Copy and paste the following code into your project: </Step>

<ComponentSource name="collapsible" />

</Steps>
</TabsContent>

</Tabs>

## Usage

```tsx
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "~/components/ui/collapsible"
```

```tsx
<Collapsible>
  <CollapsibleTrigger>Can I use this in my project?</CollapsibleTrigger>
  <CollapsibleContent>
    Yes. Free to use for personal and commercial projects. No attribution required.
  </CollapsibleContent>
</Collapsible>
```
